/*
* $Id: EditorItem.h 15 2010-01-13 15:36:32Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Volokitin Alexey
* All rights reserved
*
*/
#include "Common/include.h"
#include "EditorItem.h"

CEditorItem::CEditorItem(const std::tstring& strName, int nId)
: editorItem(strName, nId), m_size(0,0), m_point(0,0), m_bHide(false){}
CEditorItem::~CEditorItem(){}

void CEditorItem::SetSizeCx(int cx){
	m_size.cx = cx;
	ResizeItem();
}
void CEditorItem::SetPosY(int nPosY){
	m_point.y = nPosY;
}

int CEditorItem::GetSizeY(){
	return m_size.cy;
}
int CEditorItem::GetPosY(){
	return m_point.y;
}

void CEditorItem::Activate(bool bActive){}

bool CEditorItem::ProcessKey(unsigned int nChar, byte stateSysKey){
	return false;
}

bool CEditorItem::WillActive(){
	return false;
}

std::tstring CEditorItem::GetValue(){
	return _T("");
}

void CEditorItem::Hide(bool bHide){
	if(bHide)
		m_bHide = true;
	else 
		m_bHide = false;
	ResizeItem();
}

void CEditorItem::ResizeItem(){
	if(m_bHide)
		m_size.cy = 0;
	else
		Resize();
}